﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

public enum ItemType
{
    ordinary = 1,
    special = 2,
}

public struct Item
{
    public Item(string id, string type, string name, string pic1, string atk, string def, string hp, string exp, string key, string remark) {
        int num=0;
        this.id = id;
        this.type = (ItemType)Int32.Parse(type);
        this.name = name;
        this.pic1 = pic1;
        this.atk = Int32.TryParse(atk,out num) ? num : 0;
        this.def = Int32.TryParse(def, out num) ? num : 0;
        this.hp = Int32.TryParse(hp, out num) ? num : 0;
        this.exp = Int32.TryParse(exp, out num) ? num : 0;
        this.key = Int32.TryParse(key, out num) ? num : 0;
        this.remark = remark;
    }
    public string id;
    public ItemType type;
    public string name;
    public string pic1;
    public int atk;
    public int def;
    public int hp;
    public int exp;
    public int key;
    public string remark;
}

